package com.bxd.baodan.util;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bxd.baodan.R;
import com.bxd.baodan.widget.GlideCircleTransform;

/**
 * Created by lizhichao on 17/7/19.
 */

public class GlideUtil {

    public static void loadCircle(Context context, String url, ImageView view) {

        Glide.with(context).
                load(url).
                error(context.getResources().
                        getDrawable(R.drawable.empty_person)).
                transform(new GlideCircleTransform(context)).
                into(view);
    }

    public static void loadImage(Context context, String url, ImageView view) {
        Glide.with(context).
                load(url).
                error(context.getResources().getDrawable(R.drawable.img_error))
                .into(view);

    }

}
